package org.example.Thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 4.利用线程池来创建线程
 */
public class ThreadPool implements Runnable{
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        executorService.execute(new ThreadPool());
     }
    @Override
    public void run() {
        System.out.println("通过线程池来创建线程");
    }
}
